/**
 * @File name: board.c
 * @Synopsis:
 * @Author: xing.dai@aliyun.com
 * @Version: 0.0.1
 * @Date: 2018-08-01 11:03
 */

//#include "board.h"
#include "os_cpu.h"
#include <stdio.h>
#include <stdlib.h>
#include "init.h"
#if 0
void hw_init_early(void)
{
    return;
}

void board_init(void)
{
    OS_CPU_SysTickInit();

    system("stty -echo");		/* Not echo */
    system("stty -icanon");		/* To use getchar(), not wait enter. */

    // system("stty echo");
    // system("stty icanon");
}
#endif
int systick_init(struct _config_init *config)
{
    OS_CPU_SysTickInit();
    printf("exec: %s\n", __func__);
    return 0;
}

CONFIG_HW_INIT(systick, systick_init, NULL, HW_INIT_LEVEL_0);

int tty_init(struct _config_init *config)
{
    system("stty -echo");		/* Not echo */
    system("stty -icanon");		/* To use getchar(), not wait enter. */

    // system("stty echo");
    // system("stty icanon");
    printf("exec: %s\n", __func__);
    return 0;
}
CONFIG_SW_INIT(tty, tty_init, NULL, SW_INIT_LEVEL_0);
